/* 轮播内容组件 */
<template>
<swiper>
         <swiper-item :key="item" v-for="item in PicturesOfMusic">
             <a :href="item.pic">
                 <img :src="item.pic" alt="" @load="imgeLoad">
             </a>
         </swiper-item>
     </swiper>
</template>

<script>
/* 导入公共轮播组件 */
import {Swiper,SwiperItem} from '@components/common/swiper' /* 再components/common/swiper/index.js导出了  所以可用 */
export default({
    name:'HomeSwiper',
    props:{
        PicturesOfMusic:{
            type:Array,
            default(){
                return []
            }
        }
    },
    data(){
        return {
            isLoad:false
        }
    },
    components:{
        Swiper,
        SwiperItem
    },
    methods:{
        imgeLoad(){
            if(!this.isLoad){
                //只需要发送一次
                this.$emit('swipperImageLoad')
                this.isLoad = true
            }
            
        }
    }
})

</script>

<style scoped>

</style>
